Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sealable-trie: don’t use varint for tag #59

Merged
merged 1 commit into from
Oct 26, 2023
Merged

sealable-trie: don’t use varint for tag #59

merged 1 commit into from
Oct 26, 2023

Conversation

mina86
Copy link
Collaborator

@mina86 mina86 commented Oct 26, 2023

Using varints for the length of proof isn’t worth it in the end. The
proof will never be longer than 8192 elements (longest possible key is
512 bytes long) and even with the additional bit for distinguishing
membership from non-membership proofs 16-bits is enough to encode it.

Using varint to encode the tag saves us at most only one byte at the
cost of having bunch of convoluted code.

Using varints for the length of proof isn’t worth it in the end.  The
proof will never be longer than 8192 elements (longest possible key
is 512 bytes long) and even with the additional bit for distinguishing
membership from non-membership proofs 16-bits is enough to encode it.

Using varint to encode the tag saves us at most only one byte at the
cost of having bunch of convoluted code.
@mina86 mina86 requested a review from dhruvja October 26, 2023 13:15
@mina86 mina86 enabled auto-merge (rebase) October 26, 2023 13:27
@mina86 mina86 merged commit e477a1f into master Oct 26, 2023
4 checks passed
@mina86 mina86 deleted the mpn/d branch October 26, 2023 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants